package org.dromara.dashboard.controller;

import cn.dev33.satoken.annotation.SaCheckPermission;
import org.dromara.common.core.domain.R;
import org.dromara.common.web.core.BaseController;
import org.dromara.dashboard.domain.vo.IndexCardNumVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/index/card")
public class IndexCardController extends BaseController {

    @SaCheckPermission("index:card:list")
    @GetMapping("/card1")
    public R<IndexCardNumVo> card1() {
        IndexCardNumVo indexCardNum = new IndexCardNumVo();

        indexCardNum.setNumber(364);
        indexCardNum.setTrend(BigDecimal.valueOf(3.7));

        return R.ok(indexCardNum);
    }
    @GetMapping("/card2")
    public R<IndexCardNumVo> card2(){
        IndexCardNumVo indexCardNum = new IndexCardNumVo();

        indexCardNum.setNumber(317);
        indexCardNum.setTrend(BigDecimal.valueOf(10.1));
        return R.ok(indexCardNum);
    }
    @GetMapping("/card3")
    public R<IndexCardNumVo> card3() {
        IndexCardNumVo indexCardNum = new IndexCardNumVo();

        indexCardNum.setNumber(47);
        indexCardNum.setTrend(BigDecimal.valueOf(5.5));


        return R.ok(indexCardNum);
    }
    @GetMapping("/card4")
    public R<IndexCardNumVo> card4() {
        IndexCardNumVo indexCardNum = new IndexCardNumVo();

        indexCardNum.setNumber(33);
        indexCardNum.setTrend(BigDecimal.valueOf(1.9));

        return R.ok(indexCardNum);

    }
}
